package cn.explink.eap.core.metadata.domain;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class MetadataItemRowMapper implements RowMapper<MetadataItem> {

	@Override
	public MetadataItem mapRow(ResultSet rs, int rowNum) throws SQLException {
		MetadataItem item = new MetadataItem();
		item.setId(rs.getInt("item_id"));
		item.setMdId(rs.getInt("md_id"));
		item.setCode(rs.getString("item_code"));
		item.setName(rs.getString("item_code"));
		item.setRefColumn(rs.getString("item_ref_column"));
		item.setRefMd(rs.getInt("item_ref_md_id"));

		return item;
	}
}
